package com.ibeetl.cms.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
/**
 *博士后站点配置查询
 */
public class SiteQuery extends PageParam {
    @Query(name = "批准站文号", display = true)        
    private String approvalNumber;
    @Query(name = "博士后工作站名称", display = true)        
    private String workstationName;
    @Query(name = "建站时间", display = true,type=Query.TYPE_DATE_BETWEEN)
    private String date;

    private Date createDateMin;
    private Date createDateMax;
    public String getApprovalNumber(){
        return  approvalNumber;
    }
    public void setApprovalNumber(String approvalNumber ){
        this.approvalNumber = approvalNumber;
    }
    public String getWorkstationName(){
        return  workstationName;
    }
    public void setWorkstationName(String workstationName ){
        this.workstationName = workstationName;
    }
    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
        if(StringUtils.isEmpty(date)) {
            return ;
        }
        Date[] ds = Tool.parseDataRange(date);
        this.createDateMin=ds[0];
        this.createDateMax =ds[1];
    }

    public Date getCreateDateMin() {
        return createDateMin;
    }

    public void setCreateDateMin(Date createDateMin) {
        this.createDateMin = createDateMin;
    }

    public Date getCreateDateMax() {
        return createDateMax;
    }

    public void setCreateDateMax(Date createDateMax) {
        this.createDateMax = createDateMax;
    }
}
